import request from './myRequest'

export function deleteData(url) {
	return request.send({
		url: url,
		method: "DELETE"
	})
}

export function get(url) {
	return request.send({
		url: url,
		header: {
			"Content-Type": 'application/json',
		},
		method: "get"
	})
}
export function getParams(url, params) {
	return request.send({
		url: url,
		header: {
			"Content-Type": 'application/json',
		},
		method: "get",
		params: params
	})
}

export function postForm(url, data) {
	return request.send({
		url: url,
		headers: {
			"Content-Type": "application/x-www-form-urlencoded",
		},
		method: "post",
		data: data
	})
}

export function post(url, data) {
	return request.send({
		url: url,
		header: {
			"Content-Type": 'application/json',
		},
		method: "post",
		data: data
	})
}

export function limitSelect(data) { //查
	return request.send({
		url: '/city-settings/limit_select',
		header: {
			"Content-Type": 'application/json',
		},
		method: "post",
		data: data
	})
}


export function commonSelect(data) { //查
	return request.send({
		url: '/city-settings/pub_select_1',
		header: {
			"Content-Type": 'application/json',
		},
		method: "post",
		data: data
	})
}

export function commonEulbSelect(data) { //查
	return request.send({
		url: '/city-settings/eulb/pub_limit',
		header: {
			"Content-Type": 'application/json',
		},
		method: "post",
		data: data
	})
}

export function commonUpdate(data) { //改
	return request.send({
		url: '/city-settings/pub_update_1',
		header: {
			"Content-Type": 'application/json',
		},
		method: "post",
		data: data
	})
}

export function commonInsert(data) { //增
	return request.send({
		url: '/city-settings/pub_insert_1',
		header: {
			"Content-Type": 'application/json',
		},
		method: "post",
		data: data
	})
}

export function commonDelete(data) { //删
	return request.send({
		url: '/city-settings/pub_delete_1',
		header: {
			"Content-Type": 'application/json',
		},
		method: "post",
		data: data
	})
}

export function uploadImgBase64(data) { //查
	return request.send({
		url: '/mobile/uploadImgBase64/eulb',
		header: {
			"Content-Type": 'application/json',
		},
		method: "post",
		data: data
	})
}

export function getOpenId(data) { //查
	return request.send({
		url: '/pay/pay/eulb/getOpenId',
		header: {
			"Content-Type": 'application/json',
		},
		method: "post",
		data: data
	})
}


export function createOrder(data) {
	return request.send({
		url: '/pay/pay/createOrder',
		header: {
			"Content-Type": 'application/json',
		},
		method: 'post',
		data,
	})
}

export function preparePay(data) {
	return request.send({
		url: '/pay/pay/preparePay',
		header: {
			"Content-Type": 'application/json',
		},
		method: 'post',
		data,
	})
}

export function getServerUrl(data) {
	return request.send({
		url: '/mobile/getServerUrl',
		header: {
			"Content-Type": 'application/json',
		},
		method: 'get',
		data,
	})
}